home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / libshade / viewing.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-09  |  1.7 KB  |  64 lines

  1. /*
  2.  * viewing.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * viewing.h,v 4.1 1994/08/09 08:05:15 explorer Exp
  17.  *
  18.  * viewing.h,v
  19.  * Revision 4.1  1994/08/09  08:05:15  explorer
  20.  * Bump version to 4.1
  21.  *
  22.  * Revision 1.1.1.1  1994/08/08  04:52:19  explorer
  23.  * Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  24.  *
  25.  * Revision 4.0  91/07/17  14:48:26  kolb
  26.  * Initial version.
  27.  * 
  28.  */
  29. #ifndef VIEWING_H
  30. #define VIEWING_H
  31.  
  32. /*
  33.  * Screen
  34.  */
  35. typedef struct RSScreen {
  36.     int    xres, yres,        /* Resolution of entire screen */
  37.         xsize, ysize,        /* Resolution of window */
  38.         minx, miny, maxx, maxy; /* Window to be rendered */
  39.     Vector    scrnx, scrny,        /* Horizontal & vertical screen axes */
  40.         scrni, scrnj,        /* Normalized versions of the above */
  41.         firstray;        /* Direction from eye to screen UL  */
  42.     Color    background;        /* Background color */
  43. } RSScreen;
  44.  
  45. /*
  46.  * Camera
  47.  */
  48. typedef struct {
  49.     Vector    pos,            /* Eye position */
  50.         lookp,            /* Look position */
  51.         dir,            /* Look direction */
  52.         up;            /* 'Up' vector */
  53.     Float    hfov, vfov,        /* Horizontal/vertical field of view */
  54.         lookdist,        /* Eye pos/look pos distance */
  55.         aperture,        /* Aperture width (0 == pinhole) */
  56.         focaldist;        /* Distance from eye to focal plane */
  57. } RSCamera;
  58.  
  59. extern RSScreen Screen;
  60. extern RSCamera Camera;
  61.  
  62. extern Float PixelSize();
  63. #endif /* VIEWING_H */
  64.